import request from '@/utils/request'
import console from 'console'

// 查询统计列表
export function listTeacherStatistics(query) {
  console.log("查询统计列表参数为", query)
  return request({
    url: '/pingjiao/statistic/getAllEvaluationReport',
    method: 'get',
    params: query
  })
}

// 查询统计详细
export function getStatisticsDetails(evalutionActivityId, teacherId) {
  return request({
    url: '/pingjiao/statistic/getTeacherEvaluationPaperItemScoreReport/' + evalutionActivityId + '/' + teacherId,
    method: 'get'
  })
}

// 新增统计
export function addStatistics(data) {
  return request({
    url: '/pingjiao/statistics',
    method: 'post',
    data: data
  })
}

// 修改统计
export function updateStatistics(data) {
  return request({
    url: '/pingjiao/statistics',
    method: 'put',
    data: data
  })
}

// 删除统计
export function delStatistics(evaluationId) {
  return request({
    url: '/pingjiao/statistics/' + evaluationId,
    method: 'delete'
  })
}
//领导查看统计界面

//分部门排名查询统计列表
export function getDeptRank(evalutionActivityId) {
  console.log("查询统计列表" + evalutionActivityId);
  return request({
    url: '/pingjiao/statistic/getDeptRank/' + evalutionActivityId,
    method: 'get'
  })
}
// 查询统计列表
export function getStatisticsList(courseType) {
  console.log("查询统计列表" + courseType);
  return request({
    url: '/pingjiao/activity/getList/' + courseType,
    method: 'get'
  })
}
// 查询评分表详情
export function getStatisticsDetail(evalutionActivityId, teacherId) {
  // console.log("查询评分表详情" + courseType);
  return request({
    url: '/pingjiao/statistic/getTeacherEvaluationPaperItemScoreReport/' + evalutionActivityId + '/' + teacherId,
    method: 'get'
  })
}